package com.wwf;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * @author wwf
 * @date 2021年01月07日 11:06:06
 */
@SpringBootApplication
public class ServerBootstrap implements ApplicationContextAware {
    private static ApplicationContext applicationContext;
    public static void main(String[] args) throws InterruptedException {
        SpringApplication.run(ServerBootstrap.class,args);
        StartServer.startServer("127.0.0.1",8087,applicationContext);
    }

    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.applicationContext = applicationContext;
    }
}
